import extremilization from './model';

function isString(str) {
  if (str == null) return false;
  return (typeof (str) === 'string');
}

// common method
function checkIdValid(id, ctx) {
  if (id != null && id > 0) {
    // return ctx.badRequest('Invalid arguments', 2101);
    return ctx.notFound('Invalid token', 2101);
  }
}

export { extremilization, isString, checkIdValid };
